package com.engineering.elink.common;

import com.engineering.elink.util.ConfigUtil;


/**
 * 常量类
 * @author hxjxiaojun
 *
 */
public class Constant {
	public static final String ENCODING              = "UTF-8";                 //项目通用编码
	public static final String DATE_FORMAT           = "yyyy-MM-dd HH:mm:ss";   //通用时间格式
	public static final String DATE_FORMAT_YEAR      = "yyyy-MM-dd";            //通用时间格式
	
	
	public static final String WEB_SERVER_URL              = "http://"+ConfigUtil.getValue("web_server_ip"); //Apache或nginx的路径
	public static final String WEB_SERVER_PATH             = ConfigUtil.getValue("web_server_path");
	public static final int FILE_PREVIEW_COUNT             = Integer.parseInt(ConfigUtil.getValue("file_preview_Count"));
	public static final String OFFICE_SERVER_IP                = ConfigUtil.getValue("office_server_ip");
	public static final String DOWNLOAD_URL                = ConfigUtil.getValue("download_url");
	public static final String OUTPUT                             = ConfigUtil.getValue("output");
	
	// redis缓存DB位置
	public static final int  verifyCodeCache = 0;
	public static final int redisCommonCache = 1;
	public static final int  tokenAuthenticationCache = 15;
	public static final int  validTime = 99999;
	// 个人注册流程
	public static final int personRegCache = 101;
	public static final int personRegCacheOneStepValidTime = 600;
	public static final int personRegCacheTwoStepValidTime = 600;
	public static final int personRegCacheThreeStepValidTime = 600;

	// 企业注册流程
	public static final int regCompanyCache = 102;
	public static final int regCompanyCacheOneStepValidTime = 600;
	public static final int regCompanyCacheTwoStepValidTime = 600;
	public static final int regCompanyCacheThreeStepValidTime = 600;
	
	// 个人登录流程
	public static final int personLoginCache = 103;
	public static final int personLoginCacheOneStepValidTime = 600;
	
	// 企业登录流程
	public static final int companyLoginCache = 104;
	public static final int companyLoginCacheOneStepValidTime = 600;
	
	// 忘记密码流程
	public static final int forgetPasswdByEmailCache = 105;
	public static final int forgetPasswdByEmailCacheOneStepValidTime = 36000;
	public static final int forgetPasswdByEmailCacheTwoStepValidTime = 36000;
	public static final int forgetPasswdByEmailCacheThreeStepValidTime = 36000;
	public static final int forgetPasswdByEmailCacheFourStepValidTime = 36000;
	
	// 身份认证流程
	public static final int checkAuthCache = 108;
	public static final int checkAuthCacheOneStepValidTime = 36000;
	public static final int checkAuthCacheTwoStepValidTime = 36000;
	public static final int checkAuthCacheThreeStepValidTime = 36000;
	
	// 修改密码流程
	public static final int modifyPasswdCache = 110;
	public static final int modifyPasswdCacheOneStepValidTime = 36000;
	public static final int modifyPasswdCacheTwoStepValidTime = 36000;

	// 修改邮箱或手机号流程 
	public static final int modifyEmailOrPhoneCache = 111;
	public static final int modifyEmailOrPhoneCacheOneStepValidTime = 36000;
	public static final int modifyEmailOrPhoneCacheTwoStepValidTime = 36000;
	public static final int modifyEmailOrPhoneCacheThreeStepValidTime = 36000;


	// 校验身份 1 手机号 2邮箱
	public static final int checkMethodByPhone = 1;
	public static final int checkMethodByEmail = 2;
	
	// 用户类别 1企业 非1或2 用户
	public static final int personUserType = 1;
	public static final int companyUserType = 2;
	
	// 企业信息审核 1审核通过 2待审核 3审核失败
	public static final int companyReviewSuccess = 1;
	public static final int companyReviewPending = 2;
	public static final int companyReviewFailed = 3;
	
	// 企业动态分类 1职位 2 博文 3 课程
	public static final int companyDynamic1 = 1;
	public static final int companyDynamic2 = 2;
	public static final int companyDynamic3 = 3;
}
